//
//  CLReadHomeView.m
//  CLBrowser
//
//  Created by 梁慧聪 on 2022/8/13.
//

#import "CLReadHomeView.h"

@interface CLReadHomeView ()
/// 书籍名称
@property (nonatomic, strong) UILabel *name;

@end

@implementation CLReadHomeView

- (void)setReadModel:(CLReadModel *)readModel {
    _readModel = readModel;
    
    self.name.text = readModel.title;
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews {
    // 书籍名称
    UILabel *name = [[UILabel alloc]init];
    self.name = name;
    name.textAlignment = NSTextAlignmentCenter;
    name.font = CL_FONT_BOLD_SA(50);
    name.textColor = [CLReadConfigure sharedInstance].textColor;
    [self addSubview:name];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.name.frame = self.bounds;
}
@end
